<!DOCTYPE html>
<html lang="en">
	<head>
	<meta charset="utf-8" />
	<title>LDropShadowFilter</title>
	<script type="text/javascript" src="../../lufylegend-1.8.12.simple.js"></script>
	</head>
	<body>
			<div id="legend"></div>
<script>
init(50,"legend",800,450,main);
/*var list = [
[0,0,0,0,0,0,0,0],
[1,0,0,0,1,0,0,0],
[1,0,0,0,1,0,0,0],
[1,0,0,0,1,0,0,0],
[1,0,0,0,1,0,0,0],
[1,0,0,0,1,0,0,0],
[1,1,1,0,1,1,1,0],
[0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0]
];*/
var list = [
[0,0,0,0,0,0,0,0],
[1,0,0,0,0,0,0,0],
[1,0,0,0,0,0,0,0],
[1,0,0,0,0,0,0,0],
[1,0,0,0,0,0,0,0],
[1,0,0,0,0,0,0,0],
[1,1,1,0,0,0,0,0],
[0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0]
];
function main(){
	var layer = new LSprite();
	addChild(layer);
	for(var i=0;i<list.length;i++){
		for(var j=0;j<list[0].length;j++){
			drawFloor(layer,j,i);
		}
	}
	for(var i=0;i<list.length;i++){
		for(var j=0;j<list[0].length;j++){
			if(list[i][j])drawBox(layer,j,i);
		}
	}
	var title = new LTextField();
	title.x = 50;
	title.y = 190;
	title.size = 25;
	title.stroke=true;
	title.lineWidth = 2;
	title.font = "HG行書体";
	title.text = "lufylegend.js";
	var shadow = new LDropShadowFilter(5,45,"#000000");
	title.filters = [shadow];
	layer.filters = [shadow];

	addChild(title);
}
function drawFloor(layer,x1,y1){return;
	var step = 10;
	var mx = 200,my=50;
	x = x1*step*4+mx - y1*step*2 - x1*step*2;
	y = y1*step+my + x1*step;
	layer.graphics.drawLine(1,"#000",[x,y,x - step*2,y+step]);
	layer.graphics.drawLine(1,"#000",[x,y,x + step*2,y+step]);
	layer.graphics.drawLine(1,"#000",[x,y+step*2,x - step*2,y+step]);
	layer.graphics.drawLine(1,"#000",[x,y+step*2,x + step*2,y+step]);
}
function drawBox(layer,x1,y1){
	var step = 12;
	var mx = 250,my=50;
	var h = step*2;
	x = x1*step*4+mx - y1*step*2 - x1*step*2;
	y = y1*step+my - h + x1*step;
	layer.graphics.drawVertices(1,"#000",[[x,y],[x - step*2,y+step],[x,y+step*2],[x + step*2,y+step]],true,"#ccc");
	layer.graphics.drawVertices(1,"#000",[[x - step*2,y+step],[x - step*2,y+step+h],[x,y+step*2+h],[x,y+step*2]],true,"#ccc");
	layer.graphics.drawVertices(1,"#000",[[x,y+step*2],[x,y+step*2+h],[x + step*2,y+step+h],[x + step*2,y+step]],true,"#ccc");
}

</script>
			
			
			
	</body>
</html>
